Function Reference

_GUICtrlComboGetItemHeight

Determine the height of list items or the selection field in a combo box

#Include <GuiCombo.au3>
_GUICtrlComboGetItemHeight($h_combobox[, $i_index=-1])

 

Parameters

$h_combobox control id/control hWnd
$i_index Optional: Specifies the zero-based index of the string

 

Return Value

The return value is the height, in pixels, of the list items in a combo box.
If the combo box has the CBS_OWNERDRAWVARIABLE style, it is the height of the
item specified by the $i_index parameter. If $i_index is รป1, the return value
is the height of the edit control (or static-text) portion of the combo box.
If an error occurs, the return value is $CB_ERR

 

Remarks

None.

 

Related

_GUICtrlComboSetItemHeight

 

Example


#include <GuiConstants.au3>
#include <GuiCombo.au3>

Opt('MustDeclareVars',1)

Dim $Combo,$Btn_Exit,$msg,$Status

GuiCreate("ComboBox Get Item Height", 392, 254)

$Combo = GuiCtrlCreateCombo("A", 70, 10, 270, 100,$CBS_SIMPLE)
GUICtrlSetData($Combo,"B|C|D|E|F")
$Btn_Exit = GuiCtrlCreateButton("Exit", 150, 180, 90, 30)
$Status = GUICtrlCreateLabel("",0,234,392,20,BitOR($SS_SUNKEN,$SS_CENTER))
GUICtrlSetData($Status,"Item 1 Height " & _GUICtrlComboGetItemHeight($Combo, 1))

GuiSetState()
While 1
    $msg = GuiGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE Or $msg = $Btn_Exit
            ExitLoop
    EndSelect
WEnd
Exit